import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.Set;

public class Adapter implements IProject{

	Project take;
	
	public Adapter(String name, String details, double rate)
	{
		take = new Project(name, details, rate);
	}
	
	 public double getDuration(){
		 return take.getDuration();
	 }
	 
	 public double getTotalCost(){
		 return take.getTotalCost();
	 }
	 
	 public void setTask(Task newTask){
		 take.setTask(newTask);
	 }
	 
	 public List<Deliverable> getDeliverables(){
		 List<Deliverable> tempList = new ArrayList<Deliverable>();
		 
		 Set<Calendar> tempSet = take.allDeliverables().keySet();
		 
		 for(Calendar it : tempSet){
			tempList.addAll(take.allDeliverables().get(it)); 
		 }
		 return tempList;
	 }
	
}
